import Cookies from 'js-cookie'

import { useAppStore } from '@/stores/modules/app'

export function useSignInCheck() {
  const appStore = useAppStore()
  const token = Cookies.get('token')
  if (!token && appStore.isLogined) {
    appStore.clearUserInfo()
  }
}
